﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="repeater-with-dataPager.aspx.cs" Inherits="Dala.Samples.Repeater_With_DataPager.repeater_with_dataPager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function SetActivePageIndex(index) {
            $("#indexer").find("li").each(function () {
                if ($(this).children().html() == index) {
                    $(this).addClass("active");
                }
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%--<uc:breadcrumb id="ucBreadCrumb" runat="server" breadcrumbtitle="Repeater Example" />--%>
    <h2>
        Repeaters With Custom Data Pager.</h2>
    <br />
    <div id="divMessage" runat="server" class="grid_7 alpha" style="display: none;">
        <asp:Literal runat="server" ID="ltlMessage" Text="test"></asp:Literal>
    </div>
    <table class="table table-bordered table-striped">
        <asp:Repeater ID="rptProduct" runat="server">
            <HeaderTemplate>
                <tr class="dashboard-table-head">
                    <td>
                        Product Id
                    </td>
                    <td>
                        Product Name
                    </td>
                    <td>
                        Item Number
                    </td>
                    <td>
                        Category Name
                    </td>
                    <td>
                        Price
                    </td>
                </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <%#Eval("productId")%>
                    </td>
                    <td>
                        <%#Eval("productName")%>
                    </td>
                    <td>
                        <%#Eval("ItemNumber")%>
                    </td>
                    <td>
                        <%#Eval("CategoryName")%>
                    </td>
                    <td>
                        <%#Eval("Price")%>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <div class="pagination">
        <ul id="indexer">
            <asp:Repeater ID="repPager" runat="server" OnItemCommand="repPager_ItemCommand">
                <ItemTemplate>
                    <li>
                        <asp:LinkButton ID="lnbPageIndex" runat="server" CommandArgument='<%# Container.DataItem.ToString() %>'><%# Container.DataItem.ToString() %></asp:LinkButton>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
</asp:Content>
